<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="g" value="{$group_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	  <div class="searchBar">
            <ul class="searchContent">
                <li style="width:200px;">
                <label style="width: 50px;">关键字：</label>
                <input type="text" name="keywords" value="{$keywords}"/>
                </li>
                <li style="width: 100px;">
                <select class="combox" name="sfield">
                	 <option value="all" {if $wherefields=='all'}selected="selected"{/if} >全部</option>
					  <option value="id" {if $wherefields=='id'}selected="selected"{/if} >属性ID</option>
                    <option value="name" {if $wherefields=='name'}selected="selected"{/if} >属性名称</option>
					 <option value="alias" {if $wherefields=='alias'}selected="selected"{/if} >属性别名</option>
					  <option value="value" {if $wherefields=='value'}selected="selected"{/if}>属性值</option>
             
                </select>
				<input type="hidden" name="sfield_name" value="id,name,alias,value" />					
				
                </li>
				<!--	
				<li>
					状态：
					<select name="status">
						<option value='1' selected>进行中</option>
						<option value='0'>已结束</option>
					</select>
				</li>
				-->
                <li style="padding-top:0;"><div class="buttonActive"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
            </ul>
        </div>
	</form>
</div>
<script>
//	$(document).ready(function () {
//		$('.attrarray').live('change',function (){
//			var id=Array(),i=0;
//			var value = $(this).val();
//			$('.type').each(function () {
//				if($(this).attr('checked')=='checked'){
//					id[i] = $(this).val();
//					i++;
//				}
//			});
//			$.ajax({
//				type: "POST",
//				url: 'index.php?m=Attribute&a=updatearray',
//				data: 'id=' + value + '&attribute_ids=' + id,
//				success: function(msg){
//					alert('添加成功！');
//					navTab.reload("{:U('Attribute/attrgroup')}");
//				}
//			});
//		});
//	});
</script>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{:U('Attribute/add')}" target="dialog" width="600" height="450"><span>添加</span></a></li>
		</ul>
	</div>
	<table class="table" width="1200" layoutH="113">
		<thead>
			<tr>
				<th width="25"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="25" orderField="id" {if $orderField=='name'}class="{$orderDirection}"{/if}>ID</th>
				<th width="50" orderField="name" {if $orderField=='name'}class="{$orderDirection}"{/if}>属性名称</th>
				<th width="50" orderField="alias" {if $orderField=='alias'}class="{$orderDirection}"{/if}>属性别名</th>
				<th width="60" orderField="value" {if $orderField=='value'}class="{$orderDirection}"{/if}>属性值</th>
				<th width="60" orderField="sequence" {if $orderField=='sequence'}class="{$orderDirection}"{/if}>排序</th>
				<th width="80" orderField="status" {if $orderField=='status'}class="{$orderDirection}"{/if}>状态</th>
				<th width="60" align="center">操作</th>
			</tr>
		</thead>
		
		<tbody>
		<volist name='list' id='b'>
			<tr target="sid_user">
				<td><input name="ids" value="{$b['id']}" type="checkbox" class="type"></td>
				<td>{$b['id']}</td>
				<td>{$b['name']}</td>
				<td>{$b['alias']}</td>
				<td>{$b['value']}</td>
				<td>{$b['sequence']}</td>
				<td>{$status[$b['status']]}</td>
				<td>
					<a title="编辑" href="{:U('Attribute/edit',array('id'=>$b['id']))}" target="dialog" width="600" height="450" rel=“Attribute_edit" class="btnEdit">编辑</a>
					<a title="确实要删除这条记录吗?" href="{:U('Attribute/delattr',array('id'=>$b['id']))}" class="btnDel" target="ajaxTodo" title="确定要删除吗?">删除</a>
				</td>
			</tr>
		</volist>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
				<option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
				<option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
				<option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}"></div>
	</div>
</div>
